<%= simple_form_for @page do |f| %>
  <%= f.input :name, :required => true %>
  <%= f.input :slug, :required => false %>
  <%= f.input :content, :input_html => {:spellcheck => false} %>
  <%= f.input :layout_page_id, :collection => layouts_for_page(@page).collect{|pg| [pg.to_s, pg.id]}, :include_blank => '-- layout file --', :required => false unless layouts_for_page(@page).empty? %>
  <%= f.input :published, :required => false %>
  <%= f.input :root, :required => false %>

  <%= f.commit_button_or_cancel %>
<% end %>

<%= codemirror_edit @page.content_type, 'form.simple_form.cms_page', 'cms_page_content', !@page.new_record?, true %>
